
#include "editortool.h"
#include "imageeditor.h"

EditorTool::EditorTool(const QString& id, ImageEditor* parent) : m_id(id),
	m_paintDevice(0),
	m_widget(0),
	m_parent(parent)
{
	m_pen.setJoinStyle(Qt::RoundJoin);
	m_pen.setCapStyle(Qt::RoundCap);
}

EditorTool::~EditorTool()
{
}

QString EditorTool::id()
{
	return m_id;
}

void EditorTool::setImage(QImage* device)
{
	m_paintDevice = device;
}

QImage* EditorTool::image()
{
	return m_paintDevice;
}

void EditorTool::setWidget(QWidget* w)
{
	m_widget = w;
}

QWidget* EditorTool::widget()
{
	return m_widget;
}

void EditorTool::setPen(QPen p)
{
	m_pen = p;
}

QPen EditorTool::pen()
{
	return m_pen;
}

ImageEditor* EditorTool::parent()
{
	return m_parent;
}

